import axios from 'axios'

// 获取所有分类
export const getAllCategroy = ()=> axios.get('/zs/cats/lv2/statistics')

// 获取小分类
export const getMinor = ()=> axios.get('/zs/cats/lv2')

// 获取小说详情页面
export const getCategroyDetailList =(gender,major)=> 
    axios.get('/zs/book/by-categories',{
        params: {
            gender:gender,
            type:'hot',
            major:major,
            minor:'',
            start:0,
            limit:20
        }
    }) 

// 获取小说详情页面
export const getBookDetail = (id)=> axios.get(`/zs/book/${id}`)

// 获取评论
export const getBookComment = (id)=> axios.get('/zs/post/review/by-book',
    {
      params: {
            book: id,
            sort: 'update',
            start: 0,
            limit: 20
      } 
    })
    
// 获取正版小说源
export const getSource = (id)=> axios.get(`/zs/btoc?view=summary&book=${id}`)

//获取小说章节
export const getChapter = (id)=>axios.get(`/zs/atoc/${id}?view=chapters`)

//获取小说内容
export const getNovalDetail = (link)=>axios.get(`/cp/chapter/${link}`)


